<!--
*Author：富行天下团队
 
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/Food/Fcategory.js此处编写
 -->
<template>
    <div>
        <view-grid
                   ref="grid"
                   :columns="columns"
                   :detail="detail"
                   :editFormFields="editFormFields"
                   :editFormFileds="editFormFields"
                   :editFormOptions="editFormOptions"
                   :searchFormFields="searchFormFields"
                   :searchFormFileds="searchFormFields"
                   :searchFormOptions="searchFormOptions"
                   :table="table"
                   :extend="extend">
        </view-grid>
    </div>
</template>

<script>
    import extend from "@/extension/Food/Fcategory.js";
    import ViewGrid from "@/components/basic/ViewGrid.vue";
    var vueParam = {
        components: {
            ViewGrid
        },
        data() {
            return {
                table: {
                    key: 'id',
                    footer: "Foots",
                    cnName: '产品类型',
                    name: 'Fcategory',
                    url: "/Fcategory/",
                    sortName: "id"
                },
                extend: extend,
                editFormFields: {"name":"","parent_id":"","is_special":"","type":"","sort":""},
                editFormOptions: [[{"title":"分类名称","required":true,"field":"name","type":"text"}],
                              [{"title":"上级分类id","field":"parent_id","type":"text"}],
                              [{"title":"0普通1特殊","field":"is_special","type":"text"}],
                              [{"dataKey":"enable","data":[],"title":"0外卖1店内","field":"type","type":"radio"}],
                              [{"title":"排序方式(数字越小越靠前)","field":"sort","type":"number"}]],
                searchFormFields: {"name":""},
                searchFormOptions: [[{"title":"分类名称","field":"name","type":"text"}]],
                columns: [{field:'category_id',title:'产品分类id',type:'string',width:90,hidden:true,readonly:true,align:'left'},
                       {field:'name',title:'分类名称',type:'string',width:90,require:true,align:'left',sortable:true},
                       {field:'parent_id',title:'上级分类id',type:'int',width:90,align:'left'},
                       {field:'image_id',title:'分类图片id',type:'int',width:90,align:'left'},
                       {field:'is_special',title:'0普通1特殊',type:'int',width:90,align:'left'},
                       {field:'sort',title:'排序方式(数字越小越靠前)',type:'int',width:90,align:'left'},
                       {field:'type',title:'0外卖1店内',type:'int',bind:{ key:'enable',data:[]},width:90,align:'left'},
                       {field:'app_id',title:'应用id',type:'int',width:90,align:'left'},
                       {field:'id',title:'id',type:'int',width:120,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'supplierCode',title:'供应商',type:'string',width:120,align:'left'},
                       {field:'merchantCode',title:'商户编码',type:'string',width:120,align:'left'},
                       {field:'creator',title:'创建人',type:'string',width:120,align:'left'},
                       {field:'createID',title:'创建人ID',type:'int',width:120,hidden:true,align:'left'},
                       {field:'createDate',title:'创建时间',type:'datetime',width:120,align:'left',sortable:true},
                       {field:'modifyID',title:'修改人ID',type:'int',width:120,hidden:true,align:'left'},
                       {field:'modifyDate',title:'修改时间',type:'datetime',width:120,align:'left',sortable:true},
                       {field:'merchantName',title:'商户名称',type:'string',width:120,align:'left'},
                       {field:'modifier',title:'修改人',type:'string',width:120,align:'left'}],
                detail: {
                    cnName:"#detailCnName",
                    columns: [],
                    sortName: "",
                    key:""
                }
            };
        }
    };
    export default vueParam;
</script>
